package ${packageDAOImpl};

import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Service;

import com.tdcy.framework.dao.DaoImpl;
import ${packageDAO}.I${tableJavaClassName}DAO;
import ${packageBean}.${tableJavaClassName}QueryCondition;
import com.tdcy.framework.bean.PageInfo;
import ${packageEO}.${tableJavaClassName}EO;
/**
* @Description ${tableComments}DAO实现类
*/
@Service
public class ${tableJavaClassName}DAOImpl extends DaoImpl implements I${tableJavaClassName}DAO {

	public PageInfo<${tableJavaClassName}EO> getPage${tableJavaClassName}(${tableJavaClassName}QueryCondition qc){
		StringBuffer sql = new StringBuffer();
		ArrayList<Object> p = new ArrayList<Object>();
		sql.append("select  t.*\n");
		sql.append("from ${dbTableName} t where t.valid_flag =1 ");
		
		
		return this.queryRecordByClassForPageInfo(sql.toString(), ${tableJavaClassName}EO.class, qc.getPageInfo(), p.toArray());
	}
	
	public List<${tableJavaClassName}EO> getList${tableJavaClassName}(${tableJavaClassName}QueryCondition qc){
		StringBuffer sql = new StringBuffer();
		ArrayList<Object> p = new ArrayList<Object>();
		sql.append("select  t.*\n");
		sql.append("from ${dbTableName} t where t.valid_flag =1 ");
		
		
		return this.execSqlQuery(${tableJavaClassName}EO.class, sql.toString(), p.toArray());
	}

}
